<!DOCTYPE html>
<html>

<head>

<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript">
var x=0
$(document).ready(function (){
	$("div").scroll(function(){
		
		$("span").text(x++);
	});
});
</script>
</head>
<body>
<div style="height:100px;width:100px;overflow: scroll;">

hi how are you adad adsad adsada adsad aasd ad asdsa as 
asdsad da 
asdsa dadsa sasd
sa dsa dsa dsa
dsadsad sad
sadsadasd a
dsadsad a
sadsa dsad
a asadsadsadasda dsada asdsad asdsadasd sad sadsasadsa ad 

</div>

<p>you scrolled <span>0</span> times</p>
</body>


</html>